package com.ftg.learn.chapter02.util;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 * 封装一下javabase -
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/12/26 上午9:18
 */
public class JavaBaseUtil {

    public static void main(String[] args) {

        StringBuffer s = new StringBuffer();

        Runnable r = ()->{
            s.append("ab");
        };

        Runnable r1 = ()->{
            s.reverse();
        };



        ExecutorService executorService = Executors.newSingleThreadExecutor();
        executorService.execute(r);
        executorService.execute(r1);

    }


}
